]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
WindowManager: WORKAROUND: disable dimming in the overview
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 19 Jan 2014 15:12:15 +0000 (16:12 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 19 Jan 2014 15:38:19 +0000 (16:38 +0100)
Clones and effects don't mix, due to a bug in Clutter we don't
know how to fix, and sometimes the clone is clipped completely.
As a workaround, undim windows with dialogs in the overview.

Clutter bug: https://bugzilla.gnome.org/show_bug.cgi?id=659523

https://bugzilla.gnome.org/show_bug.cgi?id=650843

js/ui/windowManager.js
js/ui/workspace.js
js/ui/workspaceThumbnail.js

index 6ae0ad7c1428282f872737969c8a82db970b64eb..4c7cac468bb65dc5801e5c4ffd96c2da8846d80b 100644 (file)
@@ -569,6 +569,15 @@ const WindowManager = new Lang.Class({
                            Shell.KeyBindingMode.TOPBAR_POPUP,
                            Lang.bind(this, this._toggleAppMenu));
 
+        Main.overview.connect('showing', Lang.bind(this, function() {
+            for (let i = 0; i < this._dimmedWindows.length; i++)
+                this._undimWindow(this._dimmedWindows[i]);
+        }));
+        Main.overview.connect('hiding', Lang.bind(this, function() {
+            for (let i = 0; i < this._dimmedWindows.length; i++)
+                this._dimWindow(this._dimmedWindows[i]);
+        }));
+
         if (Main.sessionMode.hasWorkspaces)
             this._workspaceTracker = new WorkspaceTracker(this);
 
index 64542372863079208c46bcf0f3180e63436efe37..65aef3628452f87369f7fa4628d77afb5a89510e 100644 (file)
@@ -194,7 +194,6 @@ const WindowClone = new Lang.Class({
     addAttachedDialog: function(win) {
         this._doAddAttachedDialog(win, win.get_compositor_private());
         this._computeBoundingBox();
-        this._updateDimmer();
         this.emit('size-changed');
     },
 
@@ -208,7 +207,6 @@ const WindowClone = new Lang.Class({
             clone.destroy();
 
             this._computeBoundingBox();
-            this._updateDimmer();
             this.emit('size-changed');
         }));
         this.actor.add_child(clone);
@@ -228,18 +226,6 @@ const WindowClone = new Lang.Class({
             return true;
         });
         this.metaWindow.foreach_transient(iter);
-
-        this._dimmer = new WindowManager.WindowDimmer(this._windowClone);
-        this._updateDimmer();
-    },
-
-    _updateDimmer: function() {
-        if (this.actor.get_n_children() > 1) {
-            this._dimmer.setEnabled(true);
-            this._dimmer.dimFactor = 1.0;
-        } else {
-            this._dimmer.setEnabled(false);
-        }
     },
 
     get boundingBox() {
index 7fc37c8d33b723224753da5071452b93618ab304..f51b1fa8b5ddf0af3eb113baf99b889f17794e24 100644 (file)
@@ -106,9 +106,6 @@ const WindowClone = new Lang.Class({
             return true;
         });
         this.metaWindow.foreach_transient(iter);
-
-        this._dimmer = new WindowManager.WindowDimmer(this.clone);
-        this._updateDimmer();
     },
 
     // Find the actor just below us, respecting reparenting done
@@ -148,7 +145,6 @@ const WindowClone = new Lang.Class({
 
     addAttachedDialog: function(win) {
         this._doAddAttachedDialog(win, win.get_compositor_private());
-        this._updateDimmer();
     },
 
     _doAddAttachedDialog: function(metaDialog, realDialog) {
@@ -159,20 +155,10 @@ const WindowClone = new Lang.Class({
                                              Lang.bind(this, this._updateDialogPosition, clone));
         clone._destroyId = realDialog.connect('destroy', Lang.bind(this, function() {
             clone.destroy();
-            this._updateDimmer();
         }));
         this.actor.add_child(clone);
     },
 
-    _updateDimmer: function() {
-        if (this.actor.get_n_children() > 1) {
-            this._dimmer.setEnabled(true);
-            this._dimmer.dimFactor = 1.0;
-        } else {
-            this._dimmer.setEnabled(false);
-        }
-    },
-
     _updateDialogPosition: function(realDialog, cloneDialog) {
         let metaDialog = realDialog.meta_window;
         let dialogRect = metaDialog.get_outer_rect();